﻿//INNOVACALL FRAMEWORK MUST BE IN ALL VIEW JAVASCRIPT
$.fn.DocReady = function () {
	//Add call to execute when document is ready
	$("#cmdSubmit").live("click", $.fn.BeforePost);
	$("#UserToRegister_ConfirmPassword").attr("data-val-equalto-other", "UserToRegister.Password");
}
//Fix the Compare on Sub Items in model
$.fn.BeforePost = function (evt) {
	/*
	if ($("#UserToRegister_Password").val() != $("#UserToRegister_ConfirmPassword").val()) {
		//class "input - validation - error"
		evt.preventDefault();
	}
	*/
}
$.fn.MainAjaxSuccess = function (data) {
	if (data.ScriptToExecute != null) {
		eval(data.ScriptToExecute);
	}
}
$.fn.MainAjaxFailure = function (a, b, c) {
	alert("a:" + a +"\nb:" + b + "\nc:" + c);
}